package com.ucampus.dao.sql;

import org.apache.ibatis.jdbc.SQL;

public class ShopSql {
    public String update(int id,String name, String location, String message) {
        return new SQL(){{
        UPDATE("shop");
        if (name != null) {
            SET("name = #{name}");
        }
        if (location != null) {
            SET("location = #{location}");
        }
        if (message != null) {
            SET("message = #{message}");
        }
        WHERE("id=#{id}");
        }}.toString();
    }
}
